A stereo camera apparatus which measures the distance to an object based on the principle of triangulation using two cameras is known. For example, by installing a stereo camera apparatus in an automobile and thus extracting an obstacle in front or white lines on the road and calculating the distance to the obstacle or the shape of the road on which the automobile is traveling, it becomes possible to notify the driver of a danger and secure safe driving.
Since each camera is installed on the vehicle so that the camera is parallel to the road surface, distance resolution is lower for a distant place than for neighborhood. Also, since an object in a distant place appears small on an image, it is difficult to measure the distance to the object, stably. Thus, with the stereo camera apparatus, improving stability and accuracy of distance measuring for distance places is an important task.
The stereo camera analyzes images acquired from left and right cameras and calculates disparity of an object, based on the principle of triangulation, and converts the value thereof into distance data. As a disparity calculation method, a method where small areas (matching blocks) are set based on the image on the right side of the two images, as a standard image, and a reference image on the left side is searched for a small area having a high correlation value (degree of similarity), is used. For calculation of the correlation value between matching blocks, for example, there is a SAD (sum of absolute differences) method or the like.
In the technique disclosed in PTL 1, for the purpose of improving the resolution of the stereo camera apparatus, in the setting of matching blocks, disparity is calculated with neighboring blocks overlapping each other in left-right direction, whereas normally division is carried out on a block basis in order to reduce computational complexity. Thus, high accuracy and stable disparity calculation are realized.
Also, PTL 2 discloses a technique where, when a predetermined correlation value is not obtained in the search of a first matching block that is set first in a standard image and a reference image, the size of matching blocks is changed and then search is carried out again, for the purpose of increasing accuracy at corresponding points.
PTL 1: JP-A-9-133524
PTL 2: JP-A-2008-90583